package myJs.user.mission

import myJs.Utils._
import myJs.projectCps._

import scala.scalajs.js.Dynamic.{global => g}
import myJs.tool.Pojo._
import myJs.tool.Tool
import myJs.tool.Tool._
import myJs.user.mission.plot._
import org.scalajs.dom.document

import scala.scalajs.js.annotation.{JSExport, JSExportTopLevel}


/**
 * Created by yz on 2019/4/25
 */
@JSExportTopLevel("DiagnoseResult")
object DiagnoseResult extends MissionResult {

  val formId = "form"

  @JSExport("init")
  def init = {
    refreshMissionInfo(getMissionId)
    refreshFileInfo(getMissionId)
    registerEvent

    selfInit

    val inTab = "Font"

  }

  def selfInit = {
    rocPlot.Cp.Props("","").render.renderIntoDOM(document.querySelector("#roc #root"))
    prPlot.Cp.Props("","").render.renderIntoDOM(document.querySelector("#pr #root"))
  }

  def getMissionId = {
    g.missionId.toString
  }

}
